use master
go
if exists(select * from sys.databases where name = 'Supermarket')
		drop database Supermarket
create database Supermarket
on primary
(
	name = 'Supermarket',
	filename = 'E:\Supermarket.mdf',
	size = 5mb,
	filegrowth = 1mb
)
log on 
(
	name = 'Supermarket_log',
	filename = 'E:\Supermarket_log.ldf',
	size = 5mb,
	filegrowth = 1mb
)
use Supermarket
go
create table useryonghu
(
	userID			int				not null primary key identity(10000,1),
	userName		nvarchar(20)	not null,
	userPass		nvarchar(20)	not null,
	State			int				not null default(1) check(State in (1,2))
)
go
insert useryonghu (userName,userPass) values ('admin','admin')
